import { createApp } from 'vue'

import App from './App.vue'
//引入element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import {createPinia} from 'pinia'
import { createPersistedState } from 'pinia-persistedstate-plugin'
//注册所有图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


import router from './router/index.js'
import Vue3EmojiPicker from 'vue3-emoji-picker'

// import './style.css'


const pinia = createPinia()
const app = createApp(App)
const persist = createPersistedState()

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

pinia.use(persist)
app.use(pinia)
app.use(ElementPlus)


app.component('Vue3EmojiPicker', Vue3EmojiPicker)

app.use(router).mount('#app')

